home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 301-325 / 325 / rexxhostlib / interface.asm < prev    next >
Assembly Source File  |  1995-03-14  |  3KB  |  190 lines

  1. ****************************************************************************
  2. *
  3. *    This Amiga shared library is based on example source code
  4. *    written by Gary Samad & Bill Hawes. It also employs basic
  5. *    library concepts introduced by Jimm Mackraz (ELib) and
  6. *    Edwin Hoogerbeets (MkLib). This library was generated using
  7. *    a customized version of the MkLib utility.
  8. *
  9. ****************************************************************************
  10. *
  11. *    This is the skeleton for an Amiga Exec library.
  12. *    This version is written for Aztec C. It is based on the example
  13. *    library by Jimm Mackraz who got some stuff from Neil Katin.
  14. *
  15. ****************************************************************************
  16.  
  17.     INCLUDE    'exec/types.i'
  18.  
  19. Setup    MACRO
  20.     MOVEM.L    D2/D3/D4-D7/A2-A6,-(SP)
  21.     JSR    _geta4
  22.     ENDM
  23.  
  24. Push    MACRO
  25.     MOVE.L    \1,-(SP)
  26.     ENDM
  27.  
  28. Fix    MACRO
  29.     IFC    '\1',''
  30.         MEXIT
  31.     ENDC
  32.     IFLE    \1-8
  33.         ADDQ.L    #\1,SP
  34.     ENDC
  35.     IFGT    \1-8
  36.         LEA    \1(SP),SP
  37.     ENDC
  38.     ENDM
  39.  
  40. Restore    MACRO
  41.     Fix    \1
  42.     MOVEM.L    (SP)+,D2/D3/D4-D7/A2-A6
  43.     RTS
  44.     ENDM
  45.  
  46.     DSEG
  47.  
  48.     PUBLIC    _LibFuncTab
  49.  
  50. _LibFuncTab:
  51.     DC.L    LibOpen
  52.     DC.L    LibClose
  53.     DC.L    LibExpunge
  54.     DC.L    0
  55.     DC.L    XCreateRexxHost
  56.     DC.L    XDeleteRexxHost
  57.     DC.L    XSendRexxCommand
  58.     DC.L    XFreeRexxCommand
  59.     DC.L    XReplyRexxCommand
  60.     DC.L    XGetRexxCommand
  61.     DC.L    XGetRexxArg
  62.     DC.L    XGetRexxResult1
  63.     DC.L    XGetRexxResult2
  64.     DC.L    XGetToken
  65.     DC.L    XGetStringValue
  66.     DC.L    XBuildValueString
  67.     DC.L    -1
  68.  
  69.     CSEG
  70.  
  71.     PUBLIC    _RealOpen
  72.     PUBLIC    _RealClose
  73.     PUBLIC    _RealExpunge
  74.     PUBLIC    _CreateRexxHost
  75.     PUBLIC    _DeleteRexxHost
  76.     PUBLIC    _SendRexxCommand
  77.     PUBLIC    _FreeRexxCommand
  78.     PUBLIC    _ReplyRexxCommand
  79.     PUBLIC    _GetRexxCommand
  80.     PUBLIC    _GetRexxArg
  81.     PUBLIC    _GetRexxResult1
  82.     PUBLIC    _GetRexxResult2
  83.     PUBLIC    _GetToken
  84.     PUBLIC    _GetStringValue
  85.     PUBLIC    _BuildValueString
  86.  
  87.     PUBLIC    _geta4
  88.  
  89. LibOpen:
  90.     Setup
  91.     Push    A6
  92.     JSR    _RealOpen
  93.     Restore    4
  94.  
  95. LibClose:
  96.     Setup
  97.     Push    A6
  98.     JSR    _RealClose
  99.     Restore    4
  100.  
  101. LibExpunge:
  102.     Setup
  103.     Push    A6
  104.     JSR    _RealExpunge
  105.     Restore    4
  106.  
  107. XCreateRexxHost:
  108.     Setup
  109.     Push    D0
  110.     JSR    _CreateRexxHost
  111.     Restore 4
  112.  
  113. XDeleteRexxHost:
  114.     Setup
  115.     Push    D0
  116.     JSR    _DeleteRexxHost
  117.     Restore 4
  118.  
  119. XSendRexxCommand:
  120.     Setup
  121.     Push    A1
  122.     Push    A0
  123.     Push    D1
  124.     Push    D0
  125.     JSR    _SendRexxCommand
  126.     Restore 16
  127.  
  128. XFreeRexxCommand:
  129.     Setup
  130.     Push    D0
  131.     JSR    _FreeRexxCommand
  132.     Restore 4
  133.  
  134. XReplyRexxCommand:
  135.     Setup
  136.     Push    A1
  137.     Push    A0
  138.     Push    D1
  139.     Push    D0
  140.     JSR    _ReplyRexxCommand
  141.     Restore 16
  142.  
  143. XGetRexxCommand:
  144.     Setup
  145.     Push    D0
  146.     JSR    _GetRexxCommand
  147.     Restore 4
  148.  
  149. XGetRexxArg:
  150.     Setup
  151.     Push    D0
  152.     JSR    _GetRexxArg
  153.     Restore 4
  154.  
  155. XGetRexxResult1:
  156.     Setup
  157.     Push    D0
  158.     JSR    _GetRexxResult1
  159.     Restore 4
  160.  
  161. XGetRexxResult2:
  162.     Setup
  163.     Push    D0
  164.     JSR    _GetRexxResult2
  165.     Restore 4
  166.  
  167. XGetToken:
  168.     Setup
  169.     Push    A1
  170.     Push    A0
  171.     Push    D1
  172.     Push    D0
  173.     JSR    _GetToken
  174.     Restore 16
  175.  
  176. XGetStringValue:
  177.     Setup
  178.     Push    D0
  179.     JSR    _GetStringValue
  180.     Restore 4
  181.  
  182. XBuildValueString:
  183.     Setup
  184.     Push    D1
  185.     Push    D0
  186.     JSR    _BuildValueString
  187.     Restore 8
  188.  
  189.     END
  190.